package text;


import java.lang.reflect.Field;
import java.util.List;

import dao.CountryDao;
import daomain.Countries;

public class Test {

	public static void main(String[] args) {
		CountryDao cd=new  CountryDao();
//		cd.insert(new Countries("SH","shanghai",4));
//		List<Countries> lis=cd.foundAll();
//		for (Countries c : lis) {
//			System.out.println(c.toString());
//		}
//		cd.delete("SH");
		cd.update("SH");
		
		/**
		 * 反射
		 */
		Class<Countries> cs=Countries.class;
		Field[] fd=cs.getDeclaredFields();
		for (Field f : fd) {
			System.out.println(f.getName()+"\t"+f.getType().getSimpleName());
		}
	}

}
